package com.group.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.group.entity.wms.GoodsEntity;

import java.util.List;

public interface GoodsService extends IService<GoodsEntity> {

    Page<GoodsEntity> findAll(Integer page, Integer size);

    /**
     * 根据条件查找商品
     * @param goodsEntity
     * @param page
     * @param size
     * @return
     */
    Page<GoodsEntity> findByCondition(GoodsEntity goodsEntity,Integer page,Integer size);


    Page<GoodsEntity> findByPosition(Long positionId,Integer page,Integer size);

    Integer add(GoodsEntity goodsEntity);


    Integer update(GoodsEntity goodsEntity);


    Integer delete(List<Long> ids);



    GoodsEntity findById(Long goodsId);

    void fillData(Page<GoodsEntity> page);

    void fillData(GoodsEntity goodsEntity);

    QueryWrapper<GoodsEntity> initQueryWrapper(GoodsEntity goodsEntity);


    List<GoodsEntity> findByNameLike(String  keyWorld);
}
